﻿// ***********************************************************************
// Assembly         : OSS.BIM.Business
// Author           : tianteng
// Created          : 08-01-2016
//
// Last Modified By : tianteng
// Last Modified On : 08-01-2016
// ***********************************************************************
// <copyright file="DB.cs" company="北京智帆高科科技有限公司">
//     Copyright © 北京智帆高科科技有限公司2016
// </copyright>
// <summary></summary>
// ***********************************************************************

using OSS.BIM.Utility;
using Dos.ORM;

namespace OSS.BIM.Business
{
    /// <summary>
    ///     Class DB.
    /// </summary>
    public class DB
    {
        /// <summary>
        ///     The SQL con string
        /// </summary>
        public static readonly string sqliteConStr = @"Data Source=" + BmConfigUtil.GetDatabasePath();

        //public static readonly string sqlseverConStr = @"Data Source=.;Initial Catalog = OSS.BIM;User Id = sa;Password = tt19890317;";

        /// <summary>
        ///     Dos.ORM数据库访问器
        /// </summary>
        public static readonly DbSession Context = new DbSession(DatabaseType.Sqlite3, sqliteConStr);
        //public static readonly DbSession Context = new DbSession(DatabaseType.SqlServer, sqlseverConStr);
    }
}